home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
USA Bestseller
/
USA BESTSELLER Vol 1-95 (Hepp-Computer)(1995).iso
/
e004
/
yesno.btm
< prev
Wrap
Text File
|
1994-07-29
|
953b
|
49 lines
@echo off
:YESNO.BTM
REM if below line 24, scroll screen and re-position cursor
iff %_row gt 23 then
echo ^ Screen 23 0
endiff
Set Def=%@upper[%1]
Set Loops=0
echos %2&
Set CurX=%@eval[%_column + 2]
Set CurY=%_row
:Invalid
Set Loops=%@eval[%Loops + 1]
Gosub DisplayAns
Screen %CurY %CurX
Inkey /w20 %%Ans
Screen %CurY %CurX
iff "%Ans" eq "Y" then
Echo YES
Goto OK
elseiff "%Ans" eq "N" then
Echo NO
Goto OK
elseiff "%Ans" eq "X" then
Echo HALT
Goto OK
endiff
iff %Loops gt 2 then
Set Ans=%Def
Goto OK
endiff
echos ***
Beep 523 3 587 3 527 3 587 3 523 8
goto Invalid
:DisplayAns
iff "%Def" eq "Y" then
ScrPut %CurY %CurX BRIght BLInk YELlow on BLAck YES
else
ScrPut %CurY %CurX BRIght BLInk YELlow on BLAck NO
endiff
Return
:OK
Set ANSWER=%@upper[%Ans]
color WHIte on BLAck
Unset CurY CurX Def Ans loops
iff "%ANSWER" eq "X" then
Unset Answer ^ Abort Aborted by Operator
endiff